From 721cfd758c5cb905baa23ca2ef88afbb0b3ad86b Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Tue, 21 Sep 2004 12:11:17 +0000 Subject: [PATCH] fix: inclusion of non-existent template is broken. this still appears to be broken, but I think it was broken before this code existed as well. --- includes/Parser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index dd1a3bb41f..7ce3b1595e 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1631,6 +1631,7 @@ class Parser $found = false; $nowiki = false; $noparse = false; + $brokenlink = false; $title = NULL; @@ -1788,6 +1789,7 @@ class Parser if ( $this->mOutputType == OT_HTML && !$found ) { $text = '[['.$title->getPrefixedText().']]'; $found = true; + $brokenlink = true; } # Template cache array insertion @@ -1846,7 +1848,7 @@ class Parser } else { # replace ==section headers== # XXX this needs to go away once we have a better parser. - if ( $this->mOutputType != OT_WIKI ) { + if ( $this->mOutputType != OT_WIKI && !$brokenlink ) { if( !is_null( $title ) ) $encodedname = base64_encode($title->getPrefixedDBkey()); else -- 2.20.1